
#ifndef _APDU_LIB_CONTAINER_MGR_H_
#define _APDU_LIB_CONTAINER_MGR_H_
	
#include "../apdu.def/apdu_datatypes.h"


#ifdef __cplusplus
extern "C" {
#endif

	int app_create_container(HANDLE devHandle,int app_id, char * container_name, int * container_id);

	int app_open_container(HANDLE devHandle, int app_id, char * container_name, int * container_id);

	int app_close_container(HANDLE devHandle, int app_id, int container_id);

	int app_enum_containers(HANDLE devHandle, int app_id, char * container_names, int * buff_size);

	int app_delete_container(HANDLE devHandle, int app_id, char * container_name);

	int app_get_container_info( HANDLE devHandle, int app_id, char * container_name, 
				int * type, unsigned long * sign_key_len, unsigned long * exch_key_len, 
				int * sign_cert_flag, int * exch_cert_flag );
	
	int app_get_container_name(HANDLE devHandle, int app_id, int container_id, char * containerName, int * nameLen);

	int app_import_certificate( HANDLE devHandle, int app_id, int container_id, int cert_type,
				unsigned char * cert_data, int data_len );

	int app_export_certificate(HANDLE devHandle, int is_first_package, int app_id, int container_id, int cert_type, 
				unsigned char * cert_data, int * data_len);


	int app_delete_keypair(HANDLE devHandle,int app_id, int container_id, int key_spec);

	int app_delete_certificate(HANDLE devHandle,int app_id, int container_id, int key_spec);

	int app_set_container_ex_info(HANDLE devHandle, int app_id, int container_id, 
						int offset, int data_len, unsigned char* pData);

	int app_get_container_ex_info( HANDLE devHandle, int app_id, int container_id, 
						int offset, int *info_len, unsigned char* pInfo );


						

#ifdef __cplusplus
}
#endif

#endif
